<template>
  <div class="card">
    <div class="title">{{ title }}</div>
    <ul>
      <li @click="$emit('itemClick', nodeSource)" v-for="(nodeSource, index) in item" :key="'nodeSource' + index">
        <el-link style="color: #3672FE;">{{ nodeSource.label }}</el-link>
        <span>({{ nodeSource.value }})</span>
      </li>
    </ul>
  </div>
</template>

<script>
  export default {
    name: 'LeftPaneCard',
    props: {
      title: {
        type: String,
        default: '标题'
      },
      item: {
        type: Array,
        default: () => {
          return []
        }
      }
    }
  }
</script>

<style lang="scss" scoped>
  .card {
    .title {
      width: 100%;
      height: 35px;
      line-height: 35px;
      box-sizing: border-box;
      padding-left: 22px;
      background: rgba(157, 193, 228, 0.3);
      font-size: 16px;
      font-family: PingFang SC;
      font-weight: bold;
      color: #3672fe;
    }
    ul {
      width: 100%;
      box-sizing: border-box;
      padding: 13px 14px;
      list-style: none;
      li {
        cursor: pointer;
        font-family: PingFang SC;
        font-weight: 500;
        color: #333333;
        line-height: 17px;
        font-size: 17px;
        span {
          font-size: 13px;
          margin-left: 5px;
        }
      }
    }
  }
</style>
